[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 +                       Unary Identity operator;  Binary Addition operator

 +exp1                   Unary Identity

 exp1 + exp2             Binary arithmetic addition
 exp1                    any real or integer expression expression
 exp2                    any real or integer expression

    The + operator has two different meanings, depending upon its
    context.

    As a unary operator, + does not affect the value yielded by exp1; it
    does, however, prevent the C++ compiler from arbitrarily combining
    elements of exp1 with surrounding expressions.  For example:

           i = +(a + b) + c;

    As a binary operator, + performs addition.  The result depends upon
    the operands and follows the usual arithmetic conversion.  Examples:

           i  = 3223 + 88;      /* i == 3311 */
           x  = 3.5 + 4.5;      /* x == 8.0  */


See Also: Conversions -
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson